module CamlinternalFormat :
  sig
    type ('a, 'b) t =
        Int of int
      | Int_fmt of string * int
      | Int_sfmt of string * int * string * int
      | Int_ssfmt of string * int * int * string * int
      | Int32 of int32
      | Int32_fmt of string * int32
      | Int32_sfmt of string * int * string * int32
      | Int32_ssfmt of string * int * int * string * int32
      | Int64 of int64
      | Int64_fmt of string * int64
      | Int64_sfmt of string * int * string * int64
      | Int64_ssfmt of string * int * int * string * int64
      | Intnat of nativeint
      | Intnat_fmt of string * nativeint
      | Intnat_sfmt of string * int * string * nativeint
      | Intnat_ssfmt of string * int * int * string * nativeint
      | Float of float
      | Float_fmt of string * float
      | Float_sfmt of string * int * string * float
      | Float_ssfmt of string * int * int * string * float
      | String_s of string
      | String_spad of bool * int * string
      | String_S of string
      | String_Spad of bool * int * string
      | Char_c of char
      | Char_C of char
      | Bool of bool
      | Alpha of ('a -> 'b)
      | Flush
  end

type 'a channel_format =
    ((out_channel, unit) CamlinternalFormat.t list -> unit) -> 'a
type 'a buffer_format =
    ((unit, string) CamlinternalFormat.t list -> unit) -> 'a
type 'a string_format =
    ((unit, string) CamlinternalFormat.t list -> string) -> 'a

val printf : 'a channel_format -> 'a
val eprintf : 'a channel_format -> 'a
val fprintf : out_channel -> 'a channel_format -> 'a
val bprintf : Buffer.t -> 'a buffer_format -> 'a
val sprintf : 'a string_format -> 'a

type ('a, 'b) kchannel_format =
    ((out_channel, unit) CamlinternalFormat.t list -> 'a) -> 'b
type ('a, 'b) kbuffer_format =
    ((unit, string) CamlinternalFormat.t list -> 'a) -> 'b
type ('a, 'b) kstring_format =
    ((unit, string) CamlinternalFormat.t list -> 'a) -> 'b

val kfprintf :
  (out_channel -> 'a) -> out_channel -> ('a, 'b) kchannel_format -> 'b
val kbprintf :
  (Buffer.t -> 'a) -> Buffer.t -> ('a, 'b) kbuffer_format -> 'b
val ksprintf :
  (string -> 'a) -> ('a, 'b) kstring_format -> 'b
